module.exports = {
	// 配置本地服务器
	devServer: {
		// 启用代理
		proxy: {
			// 如果请求字符串中包含/motor			
			"/admin": {
				target: "https://wzapi.ewuzhen.com/", //把请求域名缓存这个域名，服务器，向别的服务器请求数据
				changeOrigin: true, //改变域名
			},
			"/home": {
				target: "https://m.mi.com/",
				changeorigin: true,
				//当请求的时候，添加请求头，欺骗别人服务器
				onProxyReq(proxyReq, req, res) {
					proxyReq.setHeader('Referer','https://m.mi.com/');
					proxyReq.setHeader('sentry-trace', 'b837e63a2d0b414b99b89f3c4698f6c6-845d65005a98d87d-0');

				}

			},
			"/2021": {
				target: "https://ewuzhen2020-public.oss-cn-hangzhou.aliyuncs.com/",
				changeorigin: true,
				//当请求的时候，添加请求头，欺骗别人服务器
				onProxyReq(proxyReq, req, res) {
					proxyReq.setHeader('Referer', 'https://www.ewuzhen.com/');
			
				}
			
			},
			"/2020": {
				target: "https://ewuzhen2020-public.oss-cn-hangzhou.aliyuncs.com/",
				changeorigin: true,
				//当请求的时候，添加请求头，欺骗别人服务器
				onProxyReq(proxyReq, req, res) {
					proxyReq.setHeader('Referer', 'https://www.ewuzhen.com/');
			
				}
			
			},
			"php": {
				target: "https://www.520mg.com/",
				changeorigin: true,
			
			},
		}
	}
}
